package com.dg.dao;

import com.dg.pojo.RoleUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(RoleUser record);

    int insertSelective(RoleUser record);

    RoleUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(RoleUser record);

    int updateByPrimaryKey(RoleUser record);

    List<Integer> getRoleIdListByUserId(Integer userId);

    int countByRoleId(Integer roleId);

    List<Integer> getUserIdListByRoleId(Integer roleId);

    void batchDeleteByRoleId(Integer roleId);

    void batchInsert(@Param("roleUserList") List<RoleUser> roleUserList);
}